﻿using System;
using System.Xml.Serialization;

namespace Bambit.XmlRpc
{

	/// <summary>
	/// The enum is used to determine what type of item a <see cref="Value"/> actually
	/// is
	/// </summary>
	[Serializable]
	[XmlTypeAttribute(IncludeInSchema = false)]
	public enum ItemChoiceType
	{
		/// <summary>
		/// The <see cref="Value.Item"/> is an <see cref="RpcArray"/> item
		/// </summary>
		[XmlEnum("array")]
		Array,

		/// <summary>
		/// The <see cref="Value.Item"/> is an array of <see cref="byte">bytes</see>
		/// </summary>
		[XmlEnum("base64")]
		Base64,

		/// <summary>
		/// The <see cref="Value.Item"/> is a bool value</see>
		/// </summary>
		[XmlEnum("boolean")]
		Boolean,
		

		/// <summary>
		/// The <see cref="Value.Item"/> is a <see cref="DateTime"/> item.
		/// </summary>
		[XmlEnum("dateTime.iso8601")]
		DateTime,

		/// <summary>
		/// The <see cref="Value.Item"/> is a <see cref="Double"/> item.
		/// </summary>
		[XmlEnum("double")]
		Double,

		/// <summary>
		/// The <see cref="Value.Item"/> is an <see cref="Int"/> item.
		/// </summary>
		[XmlEnum("i4")]
		I4,

		/// <summary>
		/// The <see cref="Value.Item"/> is an <see cref="Int"/> item.
		/// </summary>
		[XmlEnum("int")]
		Int,

		/// <summary>
		/// The <see cref="Value.Item"/> is a <see cref="String"/> item.
		/// </summary>
		[XmlEnum("string")]
		String,

		/// <summary>
		/// The <see cref="Value.Item"/> is an <see cref="RpcStruct"/> item.
		/// </summary>
		[XmlEnum("struct")]
		Struct,
	}
}
